using System;
using System.Collections.Generic;
using System.Text;


namespace Rensselaer_Event_Finder.Hibernate.DAO
{
    
     /// The service that facilitates interaction between the database
     // and the application for the LocationRating class
    public class LocationRatingDAO : GenericNHibernateDAO<LocationRating, int>
    {
        /// <summary>
        /// Make the entity persistent. It will be inserted or updated in the database
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
 
        new public LocationRating save(LocationRating entity)
        {
            Globals.getWebService().saveRating(entity.User.Id, entity.Location.Id, entity.Rating);
            Globals.syncDatabase();
            return entity;
        }
    }
}
